import { defultAlova } from "../index.js";

/** 登录 */
export function loginMiniApp(data) {
  const method = defultAlova.Post("/customer/login/login", data);
  method.meta = {
    loading: true,
  };
  return method;
}
/** 修改用户头像昵称 */
export function updateUser(data) {
  const method = defultAlova.Post("/customer/login/updateUser", data);
  method.meta = {
    loading: true,
  };
  return method;
}

/** 获取用户信息 */
export const findByOpenId = (params) => {
  const method = defultAlova.Get("/customer/login/findByOpenId", {
    params,
  });
  method.meta = {
    loading: true,
  };
  return method;
};
/** 获取用户信息 */
export const getUserDto = (params) => {
  const method = defultAlova.Get("/customer/sysUserController/getUserDto", {
    params,
  });
  return method;
};

// 已绑定商家列表
export const getUserBindMechanism = (params) => {
  return defultAlova.Get("/customer/sysUserController/getUserBindMechanism", {
    params,
  });
};
// 绑定临时商家
export const userBindMechanism = (params) => {
  return defultAlova.Get("/customer/sysUserController/userBindMechanism", {
    params,
  });
};
